Skip to content

Allow usernames in contact.social entries - #570

Merged
philmillman merged 1 commit into
mainfrom
social-contact-usernames
Nov 24, 2026
Merged

philmillman merged 1 commit into
mainfrom
social-contact-usernames

Conversation

@philmillman

Copy link
Copy Markdown
Collaborator

Summary

contact.social values had to be http(s) URLs, so cards that list a Discord username (04_BYO_Benjolin uses "@dessertplanet", 669_Computer_Tracker uses chrischn52) got ajv-schema warnings.

Every social platform now accepts either a profile URL or a handle:

  • an optional leading @
  • 1–64 letters, digits, _, . or - (covers some-user, plus.minus.audio, name.bsky.social)
  • an optional @instance.domain suffix for fediverse handles such as @user@mastodon.social

URL and handle share one pattern, so an invalid value produces a single diagnostic.

Changes

  • tools/sitegen/src/schema/infoYamlJsonSchema.js: contact.social values use the new URL-or-handle pattern
  • tools/sitegen/src/validate/rules/index.js: the warning text mentions usernames
  • documentation/info.yaml.md: field description and example show handles
  • tools/sitegen/test/validate.test.js: tests for accepted and rejected values

Testing

  • node --test test/validate.test.js test/utils.test.js passes (51/51)
  • npm run validate-info across all 151 cards reports no contact.social warnings

contact.social values previously had to be http(s) URLs, so cards that
listed a Discord username (04_BYO_Benjolin, 669_Computer_Tracker) got
schema warnings. Every platform now accepts either a profile URL or a
handle: an optional leading @, letters/digits/_/./-, and an optional
@instance.domain suffix for fediverse handles.
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Site preview removed because this PR was closed.

@philmillman
philmillman merged commit 7108a0b into main Nov 24, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants